package com;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 4.4
 *
 * @author Eric Wu
 * @create 2019-05-14
 * @since 1.8
 */
@RestController
public class HelloFeignController {

    @Autowired
    private HelloFeignService helloFeignService;

    @GetMapping(value="/search/github")
    public ResponseEntity<byte[]> searchGithubRepoByStr(@RequestParam(name = "q") String str){
        return  helloFeignService.searchRepo(str);
    }


}
